using SQLServices.RunnableItems;

namespace SQLRunnerLib.RunnableItems
{
    public class RunnableItem : IRunnableItemOld
    {

        #region Private Instances

        private readonly RunnableState _type;
        private readonly string _name;
        private readonly string _error;
        private readonly IPathItemOld _path;

        #endregion
        #region Constructors

        public RunnableItem(RunnableState state, string name, string error):
            this(state, name, error, null){}

        public RunnableItem(RunnableState state, string name, string error, IPathItemOld path)
        {
            _type = state;
            _name = name;
            _error = error;
            _path = path;
        }	

        #endregion
        #region Properties

        public RunnableState State
        {
            get { return _type; }
        }

        public string Name
        {
            get { return _name; }
        }

        public string Error
        {
            get { return _error; }
        }

        public IPathItemOld Path
        {
            get { return _path; }
        }

        #endregion

    }
}